package com.yao.club.service;

import com.yao.club.entity.request.UpdateUserInfoRequest;
import com.yao.club.entity.result.LoginResultEntity;
import com.yao.club.entity.result.ResponseEntity;
import com.yao.club.entity.UserEntity;
import com.yao.club.entity.request.ClubAuthRequestEntity;
import com.yao.club.entity.vo.UserProfileVO;
import com.yao.club.mapper.UserMapper;
import com.yao.club.token.TokenUtils;
import com.yao.club.utils.LogUtils;
import com.yao.club.utils.ResponseUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import shaded.org.apache.commons.lang3.RandomStringUtils;
import shaded.org.apache.commons.lang3.StringUtils;

import javax.annotation.Resource;
import java.util.concurrent.TimeUnit;


public interface UserService {
    /**
     * 发送登陆短信验证码
     * @param phoneNumber
     * @return
     */
    ResponseEntity<Boolean> sendLoginCode( String phoneNumber);

    /**
     * 发送忘记密码短信验证码
     * @param phoneNumber
     * @return
     */
     ResponseEntity<Boolean> sendForgetPwdCode( String phoneNumber);

    /**
     * 校验登陆验证码
     * @param entity
     * @return
     */
     ResponseEntity<LoginResultEntity> login(ClubAuthRequestEntity entity) ;
    /**
     * 账号密码登陆
     * @return
     */
     ResponseEntity<LoginResultEntity> loginByPwd(ClubAuthRequestEntity entity);

    /**
     * 校验忘记密码验证码
     * @param entity
     * @return
     */
     ResponseEntity<Boolean> resetPwd(ClubAuthRequestEntity entity) ;
    /**
     * 绑定新密码
     * @param entity
     * @return
     */
     ResponseEntity<Boolean> resetNewPwd(ClubAuthRequestEntity entity);
    /**
     * 一键登陆
     * @param phone 手机号
     * @return
     */
     ResponseEntity<LoginResultEntity> oneQuickLogin(String phone);

    /**
     *  返回用户信息
     * @return
     */
    ResponseEntity<UserProfileVO> getUserInfo(String username);

    public ResponseEntity<Boolean> updateUserInfo(String username, UpdateUserInfoRequest request);

}
